﻿#region Using Directives

using System;
using System.IO;

#endregion Using Directives


namespace Kongo.Tags
{
    internal class DebugTag : Tag
    {
        #region Methods

        public override void Render(Context context, TextWriter output)
        {
            // Give 'em the invalid variable
            output.Write("(InvalidVariableOutput=\"");
            output.Write(context.InvalidVariableOutput);
            output.WriteLine("\")");

            // Dump the context
            context.Dump(output);

            // Show them who we are
            output.WriteLine();
            output.Write(Helpers.AssemblyTitle);
            output.Write(" ");
            output.WriteLine(Helpers.AssemblyVersion);
            output.WriteLine(Helpers.AssemblyCopyright.Replace("©", "(C)"));
        }

        #endregion Methods


        #region Types

        public class DebugTagCreator : ITagCreator
        {
            #region Methods

            public Tag Create(string[] args)
            {
                return new DebugTag();
            }

            #endregion Methods
        }

        #endregion Types
    }
}
